#ifndef ENEMY_SPAWNER_H
#define ENEMY_SPAWNER_H

#include "Entity.h"
#include "Waypoint.h"

class EntityManager;
class EntityFactory;
class EnemySpawner : public Entity
{
public:
	EnemySpawner(const EEntityType& entity_type, EntityFactory* entity_factory, EntityManager* entity_manager);
	virtual ~EnemySpawner(void);

	virtual void Init(SceneObject* scene_object, Grid* grid);
	virtual void Update(float deltatime);

	void SetSpawnIntervall(float min, float max);
	void AddWaypoint(Vector3 waypoint);

protected:
	void Spawn();
	void SetSpawnTime();

	EntityFactory* m_entity_factory;
	EntityManager* m_entity_manager;

	float m_min_spawn_time;
	float m_max_spawn_time;
	float m_spawn_time;

	Waypoint m_waypoint;
};

#endif //ENEMY_SPAWNER_H